using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Cobalt75.GreyMatter
{
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class GMTableAttribute : Attribute
    {
        string pTableName;
        string pTableId;
        int pApproxSize;
        int pPriority = 10;
        public string TableName
        {
            get
            {
                return (pTableName);
            }
            set
            {
                pTableName = value;
            }
        }
        public string TableId
        {
            get
            {
                return (pTableId);
            }
            set
            {
                pTableId = value;
            }
        }
        public int ApproxSize
        {
            get
            {
                return (pApproxSize);
            }
            set
            {
                pApproxSize = value;
            }
        }
        public int Priority
        {
            get
            {
                return (pPriority);
            }
            set
            {
                pPriority = value;
            }
        }
        //public string Tag;

        //Filled in by the CacheGenertor
        internal Dictionary<FieldInfo, GMColumnBaseAttribute> _Columns;
        
        public Dictionary<FieldInfo, GMColumnBaseAttribute> Columns
        {
            get
            {
                return _Columns;
            }
        }
        internal Type _TableType;
        public Type TableType
        {
            get
            {
                return _TableType;
            }
        }
        internal ConstructorInfo ConstructorInfo;
    }
}
